<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<meta charset="utf-8">
<meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta content="telephone=no" name="format-detection">
<meta content="email=no" name="format-detection">
<title>首页</title>
<link th:href="@{/ksdH5/css/public/mui/mui.css}" rel="stylesheet"/>
<script th:src="@{/ksdH5/js/public/mui/mui.min.js}"></script>
<script th:src="@{/ksdH5/js/public/jquery.min.js}"></script>
<script th:src="@{/ksdH5/js/public/public.js}"></script>
<link th:href="@{/ksdH5/css/index.css}" rel="stylesheet"/>
</head>
<body>
<!--头部-->
<div class="mui-content">
	<div class="indexBox">
		<div class="leftNavContBox">
			<div class="leftNavContBox_touxiang">
				<div class="leftNavContBox_touxiang_left">
					<img id="head_img" th:src="@{/ksdH5/img/zwt/touxiang.png}" />
				</div>
				<div class="leftNavContBox_touxiang_right">
					<span id="nav_mer_name"></span><em id="nav_mer_phone"></em>
					<strong id="nav_mer_level"></strong>
				</div>
			</div>
			<ul class="leftNavContBox_contBox">
				<li>
					
					<a th:href="${#httpServletRequest.getScheme()+'://'+#httpServletRequest.getServerName()+':'+#httpServletRequest.getServerPort()+#httpServletRequest.getContextPath()+'/h5/plan/add'}" class="leftNavContBox_contBox_bnt ">
						<em class="leftNavContBox_ljhk">
						</em>
						<span>立即还款</span>
					</a>
				</li>
				<li>
					<a th:href="${#httpServletRequest.getScheme()+'://'+#httpServletRequest.getServerName()+':'+#httpServletRequest.getServerPort()+#httpServletRequest.getContextPath()+'/h5/quick/quick'}" class="leftNavContBox_contBox_bnt ">
						<em class="leftNavContBox_kjsk"></em>
						<span>快捷收款</span>
					</a>
				</li>
				<li>
					<a th:href="${#httpServletRequest.getScheme()+'://'+#httpServletRequest.getServerName()+':'+#httpServletRequest.getServerPort()+#httpServletRequest.getContextPath()+'/h5/smart/smart'}" class="leftNavContBox_contBox_bnt ">
						<em class="leftNavContBox_znsk"></em>
						<span>智能收款</span>
					</a>
				</li>
				<li>
					<a th:href="${#httpServletRequest.getScheme()+'://'+#httpServletRequest.getServerName()+':'+#httpServletRequest.getServerPort()+#httpServletRequest.getContextPath()+'/h5/plan/list'}" class="leftNavContBox_contBox_bnt ">
						<em class="leftNavContBox_jhlb"></em>
						<span>计划列表</span>
					</a>
				</li>
				<li>
					<a th:href="${#httpServletRequest.getScheme()+'://'+#httpServletRequest.getServerName()+':'+#httpServletRequest.getServerPort()+#httpServletRequest.getContextPath()+'/h5/card/creditCard'}" class="leftNavContBox_contBox_bnt ">
						<em class="leftNavContBox_wdkb"></em>
						<span>我的卡包</span>
					</a>
				</li>
				<li>
					<a href="javascript:void(0);" id="uploadBnt" class="leftNavContBox_contBox_bnt ">
						<em class="leftNavContBox_hysj"></em>
						<span>会员升级</span>
					</a>
				</li>
				<li>
					<a th:href="${#httpServletRequest.getScheme()+'://'+#httpServletRequest.getServerName()+':'+#httpServletRequest.getServerPort()+#httpServletRequest.getContextPath()+'/h5/setUp'}" class="leftNavContBox_contBox_bnt ">						<em class="leftNavContBox_sz"></em>
						<span>设置</span>
					</a>
				</li>
			</ul>
		</div>
	</div>
</div>
</body>
<script type="text/javascript" th:inline="javascript">
	//获得项目根路径
	var ctx = [[@{/}]];
</script>
<script type="text/javascript">
mui.init({
	swipeBack:true
})
/*打开新的下载页面窗口*/
$(document).on('click','#uploadBnt',function(){
	window.open("https://fir.im/Katimes");
})
$(function(){
    		//查询用户信息
	 $.ajax({
			url : ctx+ "h5/merInfo",
			type : "POST",
			success : function(re) {
				if (re.status == "SUCCESS") {
					var merchant = re.merchant;
					$("#nav_mer_name").text(merchant.merchantCnName);
					$("#nav_mer_phone").text(merchant.phone);
					var level = merchant.level;
					if(level=="1"){
						$("#nav_mer_level").text("免费用户");
					} else if(level=="2"){
						$("#nav_mer_level").text("经理（未激活）");
					} else if(level=="3"){
						$("#nav_mer_level").text("经理");
					}
					//指定头像
					var headImg = re.headImg;
					if(headImg != ""&& headImg !=null){
						$("#head_img").attr('src',headImg);
					}
				} else {
					
				}
			}
		}); 
   	})
    
</script>




</html>
